import 'package:dmz/base/controller/base_controller.dart';
import 'package:dmz/business/home/controller/home_main_controller.dart';
import 'package:dmz/business/home/model/moto_model.dart';
import 'package:dmz/business/mine/controller/garage_main_controller.dart';
import 'package:dmz/business/mine/controller/lost_updata_controller.dart';
import 'package:dmz/business/mine/controller/news_center_controller.dart';
import 'package:dmz/business/mine/controller/seting_main_controller.dart';
import 'package:dmz/business/mine/controller/seting_repair_controller.dart';
import 'package:dmz/routers/routers.dart';

import 'package:get/get.dart';

import 'select_moto_controller.dart';

class MinePageController extends BaseController {
  @override
  void loadNet() {}

  @override
  void onHidden() {}

  late List<MotoModel> motoList;
  int pageIndex = 0;

  @override
  void onInit() {
    motoList = Get.find<HomePageController>().motoList;
    pageIndex = Get.find<HomePageController>().pageIndex;
    super.onInit();
  }

  bottomTurn(int tag) {
    switch (tag) {
      case 0:
        Get.toNamed(RouteGet.newsCenterPage);
        break;
      case 1:
        Get.toNamed(RouteGet.lostUpdata);
        break;
      case 2:
        Get.toNamed(RouteGet.runMessage);
        break;
      case 3:
        Get.toNamed(RouteGet.setingRepair);
        break;
      case 4:
        Get.toNamed(RouteGet.addBicke);
        break;
      case 5:
        Get.toNamed(RouteGet.garagePage);
        break;
      case 6:
        Get.toNamed(RouteGet.seting);
        break;
      default:
    }
  }
}

class MineBinding extends Bindings {
  @override
  void dependencies() {
    Get.lazyPut(() => MinePageController());
    Get.lazyPut(() => GarageController());
    Get.lazyPut(() => NewsCenterController());
    Get.lazyPut(() => LostUpdataController());
    Get.lazyPut(() => SetingMainController());
    Get.lazyPut(() => SetingRepairController());
    Get.lazyPut(() => SelectMotoController());
  }
}
